package com.learn.thread.demo04;

import java.util.concurrent.TimeUnit;

/**
 * @author Java丶小明
 * @date 2021/6/28 11:49
 */
public class ThreadDemo {
    public static void main(String[] args) {
        FileSearch searcher = new FileSearch("C:\\test\\", "autoExec.bat");
        Thread thread = new Thread(searcher);
        thread.start();
        try {
            TimeUnit.SECONDS.sleep(10);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        thread.interrupt();
    }
}
